<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@include file="opendata.jsp"%>
<%@include file="check.jsp"%>
<%
 int itemid = Integer.parseInt(request.getParameter("itemid"));
 //out.print(itemid);
 int questionid = 0;
 sql = "SELECT QuestionID from Items where ItemID ="+itemid;
 rs = smt.executeQuery(sql);
 while(rs.next())
   questionid = rs.getInt(1);
 
 sql = "delete from Items where ItemID= "+itemid;
 smt.executeUpdate(sql);
  
 response.sendRedirect("edit.jsp?questionid="+questionid);
%>
